package com.example.logaop.service;

import com.example.logaop.aop.LogRecordAnnotation;
import com.example.logaop.entity.GeneralOrder;
import com.example.logaop.entity.VipOrder;
import org.springframework.stereotype.Service;

/**
 * @auther zzyy
 * @create 2022-11-19 12:10
 */
@Service
public class OrderService
{
    //@LogRecordAnnotation(desc = "saveOrder")
    @LogRecordAnnotation(desc = "saveOrder",convert = GeneralOrder.class)
    public boolean saveOrder(GeneralOrder generalOrder)
    {
        System.out.println("saveOrder操作，普通订单ID: "+generalOrder.getGeneralOrderId());
        return true;
    }

    @LogRecordAnnotation(desc = "updateOrder",convert = VipOrder.class)
    public boolean updateOrder(VipOrder vipOrder)
    {
        System.out.println("updateOrder操作，VIP订单ID: "+vipOrder.getVipOrderId());
        return true;
    }
}
